<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
<body>
	<input type="text" id="weight" placeholder="请输入您的身高.....cm">
	<input type="text" id="height" placeholder="请输入您的体重.....斤">
	<button id="btn">查询是否合格</button>
</body>
</html>
<script>
	btn.onclick = function(){		
		var h = parseInt(height.value);
		var w = parseInt(weight.value);
		var x = 0;
		x = (h-108)*2;	
		if (x>=w-10&&x<=w+10){
			alert("合格");
		}else{
			alert("不合格");
		}
	}
</script>
